package pl.koziolekweb.prusakolep.utils;

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.Scanner;

public class Reader {

	private static Scanner scanner;

	public static String read(String msg) {
		try {
			OutputStreamWriter osw = new OutputStreamWriter(System.out, Charset
					.defaultCharset().name());
			osw.write(msg+"\n");
			osw.flush();
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		scanner = new Scanner(System.in);
		return scanner.nextLine();
	}
}
